Training User-Level Differentially Private Machine-Learned Models

ABSTRACT

Systems and methods for learning differentially private machine-learned models are provided. A computing system can include one or more server computing devices comprising one or more processors and one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors cause the one or more server computing devices to perform operations. The operations can include selecting a subset of client computing devices from a pool of available client computing devices; providing a machine-learned model to the selected client computing devices; receiving, from each selected client computing device, a local update for the machine-learned model; determining a differentially private aggregate of the local updates; and determining an updated machine-learned model based at least in part on the data-weighted average of the local updates.

FIELD

The present disclosure relates generally to machine learning. Moreparticularly, the present disclosure relates to training user-leveldifferentially private machine-learned models.

BACKGROUND

As machine-learned models have become increasingly complex and suited toparticular tasks, training such models with datasets indicative ofactual usage has enabled more accurate models to be developed. Forexample, a next-word prediction model for a mobile keyboard may achieveincreased accuracy when trained by datasets including actual user inputson users' mobile devices rather than publicly available data, such asdata from public websites. However, in some implementations, datasetsindicative of actual usage may include private information associatedwith an individual user, such as the user's name, passwords, searchhistories, or other privacy sensitive information. Existing machinelearning algorithms have been unable to achieve equivalent modelaccuracy while protecting the privacy of an individual user'sinformation.

SUMMARY

Aspects and advantages of embodiments of the present disclosure will beset forth in part in the following description, or can be learned fromthe description, or can be learned through practice of the embodiments.

One example aspect of the present disclosure is directed to a computingsystem. The computing system can include one or more server computingdevices. The one or more server computing devices can include one ormore processors and one or more non-transitory computer-readable mediathat collectively store instructions that, when executed by the one ormore processors cause the one or more server computing devices toperform operations. The operations can include selecting a subset ofclient computing devices from a pool of available client computingdevices. The operations can further include providing a machine-learnedmodel to the selected client computing devices. The operations canfurther include receiving, from each selected client computing device, alocal update for the machine-learned model. The operations can furtherinclude determining a differentially private aggregate of the localupdates. The operations can further include determining an updatedmachine-learned model based at least in part on the differentiallyprivate aggregate of the local updates.

Another example aspect of the present disclosure is directed to acomputer-implemented method for differentially private machine learning.The method can include selecting, by one or more server computingdevices, a subset of client computing devices from a pool of availableclient computing devices. The method can further include providing, bythe one or more server computing devices to the selected clientcomputing devices, a machine-learned model. The method can furtherinclude determining, by each selected client computing device, a localupdate based at least in part on a local dataset. The method can furtherinclude providing, by each selected client computing device, the localupdate to the one or more server computing devices. The method canfurther include determining, by the one or more server devices, abounded-sensitivity data-weighted average of the local updates. Themethod can further include determining, by the one or more servercomputing devices, an updated machine-learned model based at least inpart on the bounded-sensitivity data-weighted average of the localupdates.

Another example aspect of the present disclosure is directed to one ormore server computing devices. The one or more server computing devicescan be configured to perform operations. The operations can includeselecting a subset of client computing devices from a pool of availableclient computing devices. The operations can further include providing amachine-learned model to the selected client computing devices. Theoperations can further include receiving, from each selected clientcomputing device, a local update for the machine-learned model. Theoperations can further include determining an updated machine-learnedmodel based at least in part on the local updates. The updatedmachine-learned model can be subject to a user-adjacent differentialprivacy guarantee.

Other aspects of the present disclosure are directed to various systems,apparatuses, non-transitory computer-readable media, user interfaces,and electronic devices.

These and other features, aspects, and advantages of various embodimentsof the present disclosure will become better understood with referenceto the following description and appended claims. The accompanyingdrawings, which are incorporated in and constitute a part of thisspecification, illustrate example embodiments of the present disclosureand, together with the description, serve to explain the relatedprinciples.

BRIEF DESCRIPTION OF THE DRAWINGS

Detailed discussion of embodiments directed to one of ordinary skill inthe art is set forth in the specification, which makes reference to theappended figures, in which:

FIG. 1 depicts a block diagram of an example computing system accordingto example aspects of the present disclosure;

FIG. 2 depicts a block diagram of an example computing system accordingto example aspects of the present disclosure;

FIG. 3 depicts a flow chart diagram of an example method fordifferentially private machine learning according to example aspects ofthe present disclosure;

FIG. 4 depicts a flow chart diagram of an example method fordifferentially private machine learning according to example aspects ofthe present disclosure; and

FIG. 5 depicts a flow chart diagram of an example method for determininga local update on a client computing device according to example aspectsof the present disclosure.

DETAILED DESCRIPTION 1. Overview

Example aspects of the present disclosure are directed to systems andmethods for maintaining differential privacy in a machine-learningframework. For example, the systems and methods of the presentdisclosure can allow for a local dataset, such as a dataset of a singleuser stored on a user's device, to be used to train a machine-learnedmodel while protecting the privacy of the user's data in the trainingdataset. For example, in some implementations, the machine-learningtechniques provided herein can be implemented within the context of afederated learning framework while providing a user-level differentialprivacy guarantee. However, the systems and methods of the presentdisclosure can be implemented in other machine-learning frameworks aswell.

More particularly, federated learning is a machine learning frameworkthat enables training of a high-quality centralized model based ontraining data distributed over a large number of client computingdevices. Federated learning may also be referred to as “federatedoptimization” in certain instances.

In federated learning, the training data can be kept locally on users'mobile computing devices (also referred to as “client computingdevices”) and such client computing devices can be used as nodes forperforming computation on their local data in order to update a globalmodel. Thus, the federated learning framework differs from conventionaldistributed machine learning due to the large number of clients, datathat is highly unbalanced and not independent and identicallydistributed (“i.i.d.”), and subject to potentially unreliable networkconnections.

Federated learning offers several distinct advantages compared toperforming learning at a centralized server. For example, information ofthe model update may be less sensitive than the data itself. Thus, userdata that is privacy sensitive can remain at the user's computing deviceand need not be uploaded to the server. Rather, only the less sensitivemodel update can be transmitted. As another advantage, federatedlearning leverages the computational power of a large number ofcomputing devices (e.g., user mobile devices). In addition, in someimplementations, the federated learning framework can be modified toallow for the creation and use of personalized models for each user attheir respective device.

However, while the federated learning framework allows user-level datato be maintained on the user's device, in some situations, suchuser-level data may nonetheless be particularly and uniquely privacysensitive. For example, a local dataset which includes text typed on auser's computing device (e.g., a mobile phone) may include passwords,text messages, and search queries. Thus, such a local dataset may becapable of identifying a particular user, such as explicitly by name orimplicitly by a unique or rare phrase, and could possibly link that userto secret or sensitive information.

The systems and methods according to example aspects of the presentdisclosure can allow for a differential privacy guarantee to be providedto such users. In a machine-learning framework, differential privacyallows for a public release of a machine-learned model with a guaranteethat adversaries are severely limited in what they can learn about theoriginal training data based on analyzing the machine-learned model'sparameters, even when such adversaries have access to arbitrary sideinformation.

In some implementations, systems implementing machine learning subjectto a differential privacy guarantee can perform the one or more of thefollowing actions in each of a plurality of rounds of modeloptimization: one or more server computing devices can select a subsetof client computing devices from a pool of available client computingdevices; a machine-learned model can be provided to the selected clientcomputing devices; each selected client computing device can determine alocal update based at least in part on a local dataset; the localupdates can be provided by the selected client computing devices to theone or more server computing devices; the one or more server computingdevices can determine a bounded-sensitivity data-weighted average of thelocal updates; and an updated machine-learned model can be determinedbased at least in part on the bounded-sensitivity data-weighted averageof the local updates. Performing a plurality of rounds of the aboveactions iteratively can improve the machine-learned model based ontraining data stored at the client devices, while providing a user-leveldifferential privacy guarantee.

For example, the one or more server computing devices can select asubset of available client computing devices. In some implementations,the available client computing devices can be client computing deviceswhich are powered on, plugged into a power source, and/or in an idlemode. In some implementations, the subset of client computing devicescan be random-sized. For example, the one or more server computingdevices can select the subset of client computing devices from the poolof available computing devices by selecting each selected clientcomputing device independently from the pool of available devices basedat least in part on a probability parameter. For example, during eachround of model optimization, a random-sized batch of client computingdevices can be independently selected with a probability q, rather thanselecting a fixed number of users. In some implementations, therandom-sized subset can be bounded, such as, for example, by upper andlower bounds, but can be any number within the bounds. In this way, anexpected number of selected client computing devices can be determined,while still providing a random-sized subset of selected client computingdevices.

A machine-learned model can then be provided to the selected clientcomputing devices. For example, one or more server computing devices canprovide a global set of parameters for a machine-learned model to eachselected client computing device.

In some implementations, after receiving the machine-learned model, eachselected client computing device can then determine a local update basedat least in part on a local dataset stored locally on the selectedclient computing device and provide the local update to the one or moreserver computing devices.

For example, in some implementations, determining the local update caninclude training the machine-learned model based at least in part on thelocal dataset to generate a locally-trained model. In someimplementations, the machine-learned model can be trained via stochasticgradient descent. For example, each selected client computing device canperform some number of mini-batch stochastic gradient descent steps togenerate the locally-trained model, such as updated local values for theglobal set of parameters for the machine-learned model.

In some implementations, determining the local update can includedetermining a difference between the locally-trained model and themachine-learned model. For example, in some implementations, thedifference between the locally-trained model and the machine-learnedmodel can be determined by determining a difference between the globalset of parameters for the machine-learned model provided by the one ormore server computing devices and the updated local values for theglobal set of parameters determined by training the machine-learnedmodel with the local dataset.

In some implementations, determining the local update can furtherinclude clipping the difference to generate the local update. Forexample, the influence of any one client computing device on an updatedmachine-learned model parameter can be limited by clipping thedifference to have a bounded L₂ norm.

In some implementations, clipping can include performing flat clipping.For example, for a single-layer model, the difference (such as a singlevector) can be clipped based on an overall clipping parameter S suchthat the local update has norm at most S. For a multiple-layer model,the concatenation of all the layers can be clipped such that the localupdate has norm at most S.

In some implementations, clipping can include performing per-layerclipping. For example, for a multiple-layer model, given a per-layerclipping parameter S_(j), each layer j can be clipped such that thelayer j has norm at most S_(j). Per-layer clipping may be preferable formultiple-layer models wherein different layers (such as vectors at eachlayer) have different L₂ norms. The local update can be determined byclipping each layer j using the per-layer clipping parameter S_(j).

Each client computing device can then provide the local update to theone or more server computing devices. For example, in someimplementations, the local update can be clipped before being providedto the one or more server computing devices, as described herein. Invarious implementations, the local update can be provided as one or morevectors, matrices, parameters, or other formats, and may be encodedbefore being provided to the one or more server computing devices.

The one or more server computing devices can then receive the localupdates from the selected client computing devices, and determine adifferentially private aggregate of the local updates. For example, insome implementations, a bounded-sensitivity data-weighted average of thelocal updates can be determined. As used herein, the bounded-sensitivitydata weighted-average can be a mean average, a median average, amoving-window average, or other form of average.

For example, in some implementations, the bounded-sensitivitydata-weighted average of the local updates can be determined based atleast in part on an expected weight parameter. For example, obtainingupdates from a random-sized subset of client computing devices for eachround of optimization can produce a variable-sized sample

. The expected weight of the sample

can then be used to determine the average of the local updates. In someimplementations, the expected weight of

can be denoted as qW, where q is a probability parameter used to selectthe client computing devices and W is the total sum of the weights ofthe local updates. Stated differently, the expected weight parameter canbe, for example, the expected weight of the expected number of users(client computing devices) sampled per round based on a probabilityparameter used to independently select the users (client computingdevices).

In some implementations, determining the bounded-sensitivitydata-weighted average of the local updates can include estimating thebounded-sensitivity data-weighted average by an unbiased estimator. Forexample, the unbiased estimator can estimate the bounded-sensitivitydata-weighted average by dividing a weighted sum of the local updates bya selection probability parameter q times the sum of all weights Wassociated with the pool of available client computing devices.

In some implementations, determining the bounded-sensitivitydata-weighted average of the local updates can include estimating thebounded-sensitivity data-weighted average by a biased estimator. Forexample, the biased estimator can estimate the bounded-sensitivitydata-weighted by dividing the weighted sum of the local updates by amaximum of: a selection probability parameter q times a lower boundweight W_(min); or a sum of all weights associated with the selectedclient computing devices.

In some implementations, determining the bounded-sensitivitydata-weighted average of the local updates can include enforcing a boundon a computed average of the local updates. For example, the bound canbe determined by multiplying the computed average of the local updatesby a minimum of one or a bound value S divided by the computed average.

The one or more server computing devices can then determine the updatedmachine-learned model based at least in part on the bounded-sensitivitydata-weighted average of the local updates.

In some implementations, determining the updated machine-learned modelbased at least in part on the bounded-sensitivity data-weighted averageof the local updates can include adding a noise component to thebounded-sensitivity data-weighted average of the local updates. Forexample, in some implementations, the noise component can be a Gaussiannoise component, which can be scaled to the sensitivity of thedata-weighted average of the local updates.

In some implementations, the one or more server computing devices candetermine a privacy guarantee parameter based at least in part on thebounded-sensitivity data-weighted average of the local updates. Theprivacy guarantee parameter can be used, for example, to evaluate thedifferential privacy of the updated machine-learned model. In someimplementations, the privacy guarantee parameter can be provided withthe updated machine-learned model to users of the machine-learned model.

In some implementations, the machine-learned model can be a neuralnetwork such as, for example, a recurrent neural network. For example,the recurrent neural network can be a long short-term (LSTM) recurrentneural network (RNN) model. For example, in some implementations, themachine-learned model can be an LSTM RNN tuned for language modeling ina mobile keyboard. The LSTM RNN can be used, for example, to predict thenext word in a sequence from one or more preceding words. In otherimplementations, the machine-learned model can be other types ofmachine-learned models, and can be used for various purposes.

The systems and methods described herein may provide a number oftechnical effects and benefits. For example, the systems and methodsprovided herein allow for machine-learned models to be trained withuser-level differential privacy guarantees. Moreover, such training canbe accomplished without sacrificing model accuracy. For example, amachine-learned model can be trained, such as via a federated learningframework, while protecting an individual user's data and/or identityfrom potential adversaries.

In turn, by providing user-level differential privacy, the systems andmethods of the present disclosure can allow for machine-learned modelsto be trained using user data which best reflects the actual use of themodel, rather than proxy data which may produce an inferior model. Forexample, a machine-learned model configured for next-word prediction ina mobile device keyboard can be trained using actual user datasetsstored locally on the users' devices. This, in turn, can allow forincreased accuracy of a machine-learned model as compared to trainingvia proxy data.

The systems and methods of the present disclosure also provide animprovement to computing technology, such as in a federated learningframework. In particular, a computing system (e.g., one or more servercomputing devices and/or one or more client computing devices) canselect a subset of client computing devices from a pool of availablecomputing devices. In some implementations, each selected clientcomputing device can be independently selected from the pool based atleast in part on a probability parameter. The computing system canfurther provide a machine-learned model to the selected client computingdevices. The computing system can receive a local update for themachine-learned model from the selected client computing devices. Thelocal update can be determined, for example, by training themachine-learned model using a local dataset stored on the selectedclient computing device to generate a locally-trained model. In someimplementations, the local update can be a clipped difference betweenthe locally-trained model and the machine-learned model. The computingsystem can determine a bounded-sensitivity data-weighted average of thelocal updates. In some implementations, the computing system candetermine the bounded-sensitivity data-weighted average of the localupdates based at least in part on an expected weight parameter. In someimplementations, the bounded-sensitivity data-weighted average of thelocal updates can be determined by a biased or an unbiased estimator.The computing system can determine an updated machine-learned modelbased at least in part on the bounded-sensitivity data-weighted averageof the local updates. In some implementations, the computing system candetermine the updated machine-learned model by adding a noise componentto the bounded-sensitivity data-weighted average of the local updates.

2. Example Discussion of User-Level Differentially Private ModelTraining 2.1 Introduction to Example Concepts

Machine-learned models, such as deep recurrent models like longshort-term memory (LSTM) recurrent neural networks (RNNs), have become astandard building block in modern approaches to language modeling, withapplications in speech recognition, input decoding for mobile keyboards,and language translation. Because language usage can vary widely byproblem domain and dataset, training a language model on data from theright distribution can be important. For example, a model to aid typingon a mobile keyboard may be better served by training data typed inmobile apps rather than from scanned books or transcribed utterances.However, language data can be uniquely privacy sensitive. For example,in some implementations, such as text typed on a user's computing device(e.g., mobile phone), sensitive information can include passwords, textmessages, search queries, or other privacy sensitive information. Insome instances, language data may identify an individual user, such asexplicitly by name or implicitly, for example via a rare or uniquephrase, and may be able to link that individual to secret or sensitiveinformation.

Thus, in some implementations, it may be preferable for a languagemodel's parameters to encode patterns of language use common to manyusers without memorizing any individual user's unique input sequences.However, in some instances, machine-learned models, such asconvolutional neural networks, have been shown to memorize arbitrarylabelings of the training data, and anecdotally, recurrent languagemodels also appear to be capable of memorizing unique patterns in thetraining data. Further, attacks on machine-learned models haveunderscored the implicit risk. Example aspects of the present disclosureare thus directed towards providing a strong guarantee that the trainedmodel can protect the privacy of individuals' data without unduesacrifice in model quality.

One example application of the present disclosure is directed towards anexample of training a machine-learned model for next-word prediction ina mobile keyboard. This example is well suited to the techniquesintroduced herein, as differential privacy may allow for training ondata from the true distribution (such as actual mobile usage) ratherthan on proxy data from some other source that would produce inferiormodels. However, one of ordinary skill in the art will recognize thatthe systems and methods of the present disclosure can be applied to avariety of machine-learned models and applications.

Additional aspects of the present disclosure are directed towardsapplying differential privacy to model training using the notion ofuser-adjacent datasets, leading to formal guarantees of user-levelprivacy, rather than privacy for single examples.

Additional aspects of the present disclosure are directed towardsexample algorithms which include a noised version of the federatedaveraging algorithm, which satisfies user-adjacent differential privacyvia use of the moments accountant first developed to analyzedifferentially private stochastic gradient descent (SGD) forexample-level privacy. (see Abadi, et al. Deep Learning withdifferential privacy. 23^(rd) ACM Conference on Computer andCommunications Security (ACM CCS), 2016). The example federatedaveraging approach can group multiple SGD updates together, enablinglarge-step model updates.

2.1.1 Example Definitions for Differential Privacy

Differential privacy (DP) can provide a well-tested formalization forthe release of information derived from private data. Applied to machinelearning, a differentially private training mechanism can allow thepublic release of model parameters with a strong guarantee: adversariescan be severely limited in what they can learn about the originaltraining data based on analyzing the parameters, even when they haveaccess to arbitrary side information.

Definition 1: Differential Privacy: A randomized mechanism

→

with a domain

(e.g., possible training datasets) and range

(e.g., all possible trained models) satisfies (ε, δ)-differentialprivacy if for any two adjacent datasets d, d′∈

and for any subset of outputs S⊆

it holds that Pr[

(d)∈S]≤e^(ε)Pr[

(d′)∈S]+δ.

Definition 1 leaves open the definition of adjacent datasets which maydepend on the application. For example, in some implementations,differentially private machine learning may deal with example-levelprivacy: two datasets d and d′ are defined to be adjacent if d′ can beformed by adding or removing a single training example from d.

However, in some implementations, such as language modeling, protectingindividual examples may be insufficient to protect an individual user'sdata and/or identity. For example, each typed word can make anindividual contribution to a machine-learned model's training objective,so one user may contribute many thousands of examples to the trainingdata. Further, a sensitive word or phrase may be typed several times byan individual user, but nonetheless should still be protected. Thesystems and methods of the present disclosure therefore apply thedefinition of differential privacy to the user-level, protecting wholeuser histories in the training set. This user-level privacy is ensuredby using an appropriate adjacency relationship, defined in Definition 2.

Definition 2: User-adjacent datasets: Let d and d′ be two datasets oftraining examples, where each example is associated with a user. Then, dand d′ are adjacent if d′ can be formed by adding or removing all of theexamples associated with a single user from d.

Thus, model training that satisfies differential privacy with respect todatasets that are user-adjacent can satisfy an intuitive notion ofprivacy for language modeling: the presence or absence of any specificuser's data in the training set has an imperceptible impact on the(distribution over) the parameters of the learned model. Thus, anadversary looking at the trained model cannot infer whether any specificuser's data was used in the training, irrespective of what auxiliaryinformation they may have. In particular, differential privacy can allowfor ruling out the memorization of sensitive information in a stronginformation theoretic sense.

2.2 Example Algorithms for User-Level Differentially Private Training

Example algorithms provided by the present disclosure are based on orcan otherwise be used in combination with Federated Averaging (orFedAvg) for federated learning. For example, in federated learning, ashared model can be trained while leaving the training data on eachuser's client computing device (e.g., mobile device). For example,devices can download the current model and compute an update byperforming local computation on a local dataset. In someimplementations, it may be worthwhile to perform extra computation oneach user's data to minimize the number of communication rounds requiredto train a model, such as when the client computing device is subject tolimited bandwidth. However, the example algorithms provided herein canbe used in other applications and/or other model training frameworks.For example, using the FedAvg algorithm may be of interest even in adatacenter application when differential privacy is applied: largerupdates may be more resistant to noise, and fewer rounds of training canimply less privacy cost. Further, the example algorithms provided hereincan determine per-user updates based on a single user's data, and theseupdates can then be averaged to compute the final update applied to theshared model on each round. The example algorithms of the presentdisclosure can thus be extended to provide a user-level differentialprivacy guarantee.

Further, the example algorithms of the present disclosure can also beapplied to or otherwise used in combination with the Federated SGD(FedSGD) algorithm. For example, the FedSGD algorithm can be essentiallylarge-batch SGD where each minibatch is composed of “microbatches” thatinclude data from a single distinct user. In some datacenterapplications, FedSGD might be preferable to FedAvg, since fast networksmay make it more practical to run more iterations. However, thoseadditional iterations may come at a privacy cost. Further, the privacybenefits of federated learning can be nicely complementary to those ofdifferential privacy, and FedAvg can be applied in the datacenter aswell, so example aspects of the present disclosure are directed towardsthe FedAvg algorithm, but extend to the FedSGD and/or other suitablealgorithms as well.

In some implementations, example modifications can be used to achievedifferential privacy. For example, in some implementations, random-sizedbatches can be used, wherein client computing devices (e.g., userdevices) can be selected independently with probability q, rather thanalways selecting a fixed number of users. In some implementations,clipping of per-user updates can be enforced so the total update hasbounded L₂ norm. In some implementations, different estimators can beused to determine an average update. Further, in some implementations,Gaussian noise can be added to the final average update.

Example pseudocode according to example aspects of the presentdisclosure for differentially private FedAvg and FedSGD algorithms isprovided in section 2.2.1. In section 2.2.2, example estimators areintroduced, and in section 2.2.3, example clipping strategies areintroduced, which together can allow the sensitivity of each rounds'update to any one user's data to be bounded. Further, the examplesampling and example noise addition aspects of the present disclosurecan allow for the moments accountant described herein to bound the totalprivacy loss of example algorithms of the present disclosure, asdetailed in section 2.2.4. Finally, in section 2.2.5, properties of themoments accountant for training on large datasets are evaluated.

2.2.1 Example Training Loop Pseudocode

Example pseudocode training loops for modified FedAvg and FedSGDalgorithms are provided below, with only the user updated function(UserUpdate FedAvg or UserUpdate FedSGD) differing between the twoexample training loops. The example pseudocode calls to the momentsaccountant

referenced herein. In some implementations, the example user updatefunctions can be parameterized by a clipping strategy and correspondingparameters, either FlatClip or PerLayerClip. In some implementations,both clipping strategies can use a local learning rate η and batch size

. In some implementations,

can be set much larger for the example FedSGD algorithms.

  Main training loop: parameters  user selection probability q ∈ (0,1] per-user example cap ŵ ∈

⁺  noise scale z ∈

⁺  estimator {tilde over (f)}_(f), or {tilde over (f)}_(c) with paramW_(min)  UserUpdate (for FedAvg or FedSGD)  ClipFn (FlatClip orPerLayerClip) Initialize model θ⁰ Initialize moments accountant  

n_(k) = (number of examples for user k)$w_{k} = {{\min\left( {\frac{n_{k}}{\hat{w}},1} \right)}{for}{all}{users}k}$W = Σ_(kd)w_(k) for each round t = 0, 1, 2, . . . do  

 ^(t) ← (sample users with probability q)  for each user k ∈

 ^(t) in parallel do  {tilde over (Δ)}_(k) ^(t+1) ← UserUpdate(k, θ^(t),ClipFn)   Δ t + 1 = ( ∑ k ∈ t w k ⁢ Δ k qW for ⁢ f ~ f ∑ k ∈ t w k ⁢ Δ kmax ( qW min , ∑ k ∈ t w k ⁢ Δ k for ⁢ f ~ c  S ← (bound on || Δ_(k) ||for ClipFn)  $\left. \sigma\leftarrow\left\{ {\frac{zS}{qW}f{or}{\overset{\sim}{f}}_{f}{or}\frac{2{zS}}{{qW}_{\min}}{\_ f}{or}{\overset{\sim}{f}}_{c}} \right\} \right.$ {tilde over (Δ)}^(t+1) = Δ^(t+1) +  

 (0, Iσ²)  θ^(t+1) ← θ^(t) + {tilde over (Δ)}^(t+1)  

.accum_priv_spending(z) print

.get_privacy_spent( ) FlatClip(Δ): parameter S return π(Δ, S) // See Eq.4 PerLayerClip (Δ) : parameters S₁, . . . S_(m)$S = \sqrt{\Sigma_{j}S_{j}^{2}}$ for each layer j ∈ {1, . . . , m} do Δ′(j) = π(Δ(j), S_(j)) return Δ′ UserUpdateFedAvg(k, θ⁰, ClipFn):parameters B, E, η θ ← θ⁰

  ← (k′s data split into size B batches) for each local epoch i from 1to E do  for batch b ∈

 do  θ ← θ − η∇ 

 (θ; b)  θ ← θ⁰ + ClipFn(θ − θ⁰) return update ∇_(k) = θ − θ⁰ // Alreadyclipped. UserUpdateFedSGD(k, θ⁰, ClipFn): parameters B, η select a batchb of size B from k′s examples return update Δ_(k) = ClipFn(−η∇ 

 (θ; b))

2.2.2 Example Bounded-Sensitivity Estimators for Weighted AverageQueries

In some implementations, example estimators of the present disclosurecan be used to determine the bounded-sensitivity data-weighted averageof the local updates. For example, randomly sampling users (or trainingexamples) by selecting each independently with probability q can allowfor proving low privacy loss through the use of the moments accountant

. However, this can produce variable-sized samples

, and when the quantity to be estimated is an average rather than a sum(as in computing the weighted average update in FedAvg or the averageloss on a minibatch in SGD with example-level differential privacy), thevariable-size of the sample may have ramifications for the sensitivityof the query.

In some implementations, estimators can be used to determine theweighted averages to which the moments accountant

can be applied. For example, d can be a weighted database where each rowk∈d is associated with a particular user and has an associated weightw_(k)∈[0,1]. The weight can capture the desired influence of the row onthe final outcome. For example, row k can contain n_(k) differenttraining examples all generated by user k, with weight w_(k)proportional to n_(k). In a federated learning framework, a weightedmodel update Σ_(k∈d) W_(k)Δ(d_(k), θ)/Σ_(k∈d)W_(k) can be applied, whereΔ(d_(k), θ) is the model update determined using data d_(k)from the userk (with the notation abused slightly by also writing d for the set ofusers in the database). More generally, the database query can beexpressed as:

$\begin{matrix}{{f(d)} = \frac{\sum_{k \in d}{w_{k}\Delta_{k}}}{\sum_{k \in d}w_{k}}} & (1)\end{matrix}$

where Δ_(k) is some vector depending on d_(k).

In some implementations, to reduce the computation and/or privacy cost,the weighted average can be estimated by sampling a small number ofusers. For example, in a uniform sampling approach, each row can besampled independently with probability q, which allows a tight bound tobe maintained on privacy loss. Let

denote such a sample. Let W=Σ_(k∈d) W_(k) denote the total sum of theweights. ƒ(d) can then be approximated using

. For example, an unbiased estimator can be:

$\begin{matrix}{{\overset{\sim}{f_{f}}(\mathcal{C})} = \frac{\sum_{k \in \mathcal{C}}{w_{k}\Delta_{k}}}{qW}} & (2)\end{matrix}$

Since qW is the expected weight of

.

In some implementations, a biased estimator can be used. For example, abiased estimator can be

${{{\overset{\sim}{f}}_{*}(\mathcal{C})} = \frac{\sum_{k \in \mathcal{C}}{w_{k}\Delta_{k}}}{\sum_{k \in \mathcal{C}}w_{k}}},$

which may have a lower variance when only a small number of users aresampled. In order to control the sensitivity of {tilde over (ƒ)}_(*),the denominator can include a lower bound (with parameter W_(min)) as:

$\begin{matrix}{{{\overset{\sim}{f}}_{c}(\mathcal{C})} = \frac{\sum_{k \in \mathcal{C}}{w_{k}\Delta_{k}}}{\max\left( {{qW_{\min}},{\sum_{k \in \mathcal{C}}w_{k}}} \right)}} & (3)\end{matrix}$

In some implementations in which the updates Δ_(k) are highlycorrelated, {tilde over (ƒ)}_(*) may provide a better estimate than{tilde over (ƒ)}_(ƒ).

In some implementations, the sensitivity of an estimator ƒmay need to becontrolled, defined as

(ƒ)=max_(k) ∥ƒ(

∪{k})−ƒ(

)∥, where the added user k can have arbitrary data. In someimplementations, the sensitivity of the estimator can be limited byclipping each summand in the estimator to have bounded L₂ norm. Forexample, for given bound S>0, a clipping projection which can be appliedcan be:

$\begin{matrix}{{\pi\left( {\Delta,S} \right)}\overset{def}{=}{\Delta \cdot {\min\left( {1,\frac{S}{\Delta }} \right)}}} & (4)\end{matrix}$

In some implementations, clipping may lead to additional bias. In someimplementations, a clipping parameter can be chosen to be large enoughthat nearly all updates are smaller than the clip value. However, alarger S may require more noise in order to achieve privacy, which mayslow training. Thus, S can be treated as a hyper-parameter and can betuned. Clipping strategies are considered in greater detail in section2.2.3. Assuming that clipping has been applied to each update, in someimplementations, the sensitivity of (2) and (3) can be bounded:

Lemma 1 If for all users k we have ∥w_(k)Δ_(k)∥₂≤S, then the sensitivityof the two estimators is bounded as

${{\mathbb{S}}\left( \overset{\sim}{f_{f}} \right)} \leq {\frac{S}{qW}{and}{{\mathbb{S}}\left( {\overset{\sim}{f}}_{c} \right)}} \leq {\frac{2S}{{qW}_{\min}}.}$

Proof. For the first bound, observe the numerator in the estimator{tilde over (ƒ)}_(ƒ) can change by at most S between neighboringdatabases, by assumption. The denominator is a constant. For the secondbound, the estimator {tilde over (ƒ)}_(c) can be thought of as the sumof the vectors w_(k)Δ_(k) divided by max(qW_(min),

Δ_(k)). Writing Num (

) for the numerator

w _(k)Δ&_(k), and Den(C) for the denominator max(qW_(min),

W_(k)), the following are immediate for any C and

′

∪{k}:

∥Num(C′)−Num(C)∥=∥w _(k)Δ_(k) ∥≤S.

∥Den(C′)−Den(C)∥≤1.

∥Den(C′)∥≥qW _(min).

It follows that

$\begin{matrix}{{{{{\overset{\sim}{f}}_{c}\left( \mathcal{C}^{\prime} \right)} - {{\overset{\sim}{f}}_{c}(\mathcal{C})}}} = {{\frac{N{{um}\left( \mathcal{C}^{\prime} \right)}}{D{{en}\left( \mathcal{C}^{\prime} \right)}} - \frac{N{{um}(\mathcal{C})}}{D{{en}(\mathcal{C})}}}}} \\{= {{\frac{{{Num}\left( \mathcal{C}^{\prime} \right)} - {N{{um}(\mathcal{C})}}}{D{{en}\left( \mathcal{C}^{\prime} \right)}} + {{{Num}(\mathcal{C})}\left( {\frac{1}{D{{en}\left( \mathcal{C}^{\prime} \right)}} - \frac{1}{{Den}(\mathcal{C})}} \right)}}}} \\{{{{\leq \text{}{{\frac{w_{k}\Delta_{k}}{{Den}\left( \mathcal{C}^{\prime} \right)}} +}}}\frac{{Num}(\mathcal{C})}{D{{en}(\mathcal{C})}}\left( \frac{{D{{en}(\mathcal{C})}} - {{Den}\left( \mathcal{C}^{\prime} \right)}}{{Den}\left( \mathcal{C}^{\prime} \right)} \right)}} \\{\leq \text{}{\frac{S}{qW_{\min}} + {{{{\overset{\sim}{f}}_{c}(\mathcal{C})}}\left( \frac{1}{qW_{\min}} \right)}}} \\{\leq {\frac{2S}{qW_{\min}}.}}\end{matrix}$

∥{tilde over (ƒ)}_(c)(C)∥≤S. Thus, the claim follows.

2.2.3 Example Clipping Strategies for Multi-Layer Models

In some implementations, for sensitivity to be controlled, Lemma 1 onlyrequires that ∥w_(k)Δ_(k)∥ be bounded. In some implementations, clippingmay be applied only to updates Δ_(k) , with w_(k)≤1. For example, for amodel with a single parameter vector, Δ′_(k)=π(Δ_(k),S).

However, in some implementations, such as for multi-layer models, theparameters of each layer can be treated as a separate vector. Forexample, in some implementations, the updates to each layer could have adifferent L₂ norm, so it may be preferable to clip each layerseparately.

In some implementations, flat clipping or per-layer clipping strategiescan be performed. Formally, let each update Δ_(k) contain m vectorsΔ_(k)=(Δ_(k)(1), . . . , Δ_(k)(m)). The following clipping strategiescan ensure the total update has norm at most S:

Flat clipping: In some implementations, a plurality of layers can beconcatenated, and the concatenation can be clipped. For example, givenan overall clipping parameter S, the concatenation of all the layers canbe clipped as Δ′_(k)=π(Δ_(k) ,S).

Per-layer clipping: In some implementations, each layer can be clippedaccording to a clipping parameter. For example, given a per-layerclipping parameter S_(j) for each layer, setΔ_(k),(j)=π(Δ_(k)(j),S_(j)). Let S=√{square root over (Σ_(j=1) ^(m)S_(j)²)}. In some implementations, a model-independent choice is to use

$S_{j} = \frac{S}{\sqrt{m}}$

for all j.

2.2.4 Example Privacy Guarantees

In some implementations, a privacy guarantee parameter can bedetermined. For example, in some implementations, once the sensitivityof a chosen example estimator is bounded, noise can be added to obtain aprivacy guarantee. For example, in some implementations, Gaussian noisescaled to this sensitivity can be added. For example, in someimplementations, an (ε, δ)-differential privacy bound can be used forthe Gaussian mechanism, and the privacy amplification lemma and theadvanced composition theorem can be applied to get a bound on the totalprivacy cost. In some implementations, a moments accountant

can be used to achieve privacy bounds. For example, the momentsaccountant for the sampled Gaussian mechanism can upper bound the totalprivacy cost of T steps of the Gaussian mechanism with noise N(0, σ²)for σ=z·

, where z is a parameter,

is the sensitivity of the query, and each row is selected withprobability q. Given a δ>0, the moments accountant can give an E forwhich this mechanism satisfies (ε, δ)-differential privacy.

Theorem 1 For the example estimators ({tilde over (ƒ)}_(ƒ), {tilde over(ƒ)}_(c)), the moments accountant of the sampled Gaussian mechanismcorrectly computes the privacy loss with the noise scale of z=σ/

and steps T, where

=S/qW for ({tilde over (ƒ)}_(ƒ)) and 2S/qW_(min) for ({tilde over(ƒ)}_(c)).

Proof. It suffices to verify that 1) the moments (of the privacy loss)at each step are correctly bounded; and, 2) the composability holds whenaccumulating the moments of multiple steps.

At each step, users can be selected randomly with probability q. If inaddition the L₂-norm of each user's update is upper-bounded by

, then the moments can be upper-bounded by that of the sampled Gaussianmechanism with sensitivity 1, noise scale σ/

, and sampling probability q.

The example algorithms of the present disclosure can use a fixed noisevariance and can generate the independent and identically distributed(i.i.d.) noise independent of the private data. Thus, the composabilityas in Theorem 2.1 in Abadi, et al., Deep Learning with differentialprivacy. 23^(rd) ACM Conference on Computer and Communications Security(ACM CCS), 2016, can be applied.

The theorem can thus be obtained by combining the above and thesensitivity bounds {tilde over (ƒ)}_(ƒ) and {tilde over (ƒ)}_(c).

2.2.5 Example Differential Privacy for Large Datasets

In some implementations, increasing the dataset size can allow for highlevels of privacy to be obtained more easily. For example, the momentsaccountant can make strong use of amplification via sampling. Table 1summarizes privacy guarantees as certain parameters are varied.

TABLE 1 users sample noise Upper bound on privacy ε after 1, 10, . . .10⁶ rounds K {tilde over (C)} z 10⁰ 10¹ 10² 10³ 10⁴ 10⁵ 10⁶ 10⁵ 10² 1.00.97 0.98 1.00 1.07 1.18 2.21 7.50 10⁶ 10¹ 1.0 0.68 0.69 0.69 0.69 0.690.72 0.73 10⁶ 10³ 1.0 1.17 1.17 1.20 1.28 1.39 2.44 8.13 10⁶ 10⁴ 1.01.73 1.92 2.08 3.06 8.49 32.38 187.01 10⁶ 10³ 3.0 0.47 0.47 0.48 0.480.49 0.67 1.95 10⁹ 10³ 1.0 0.84 0.84 0.84 0.85 0.88 0.88 0.88

Table 1 shows the privacy for different total numbers of users K (allwith equal weight), expected number of users sampled per round {tildeover (C)}, and the number of rounds of training, where for each row,

$\delta = \frac{1}{K^{1.1}}$

is set and the value of ε for which (ε, δ)-differential privacy holdsafter 1 to 10⁶ rounds is reported. Thus, for large datasets, additionalrounds of training incur only a minimal additional privacy loss.

Therefore, in implementations in which the cost in utility of addingnoise proportional to z times the sensitivity of the updates can beafforded, reasonable privacy guarantees over a large range of parameterscan be obtained. In some implementations, the size of the dataset canhave a modest impact on the privacy cost of a single query (1 roundcolumn), but a large effect on the number of queries that can be runwithout significantly increasing the privacy cost (compare the 10⁶ roundcolumn). For example, on a dataset with 10⁹ users, the privacy upperbound is nearly constant between 1 and 10⁶ calls to the mechanism (thatis, rounds of the optimization algorithm).

Further, in some implementations, there may only be a small cost inprivacy for increasing the expected number of (equally weighted) users{tilde over (C)}=qW selected on each round as long as {tilde over (C)}remains a small fraction of the size of the total dataset. Since thesensitivity of an average query decreases like 1/{tilde over (C)} (andhence the amount of noise needed to be added decreases proportionally),{tilde over (C)} can be varied (e.g., increased) to select a noise levelthat does not adversely affect the optimization process.

Example models using example algorithms of the present disclosure havebeen empirically evaluated on a realistic dataset, and demonstrated thatuser-level differentially private training of a machine-learned model ispossible at a negligible loss in utility, instead paying a cost inadditional computation. Such private training, particularly in afederated learning framework, shows the possibility of training modelswith significant privacy guarantees for important applications.

For example, a high quality LSTM language model trained with strongprivacy guarantees according to example aspects of the presentdisclosure has been demonstrated to exhibit no significant decrease inmodel accuracy given a large enough dataset. For example, on a datasetof 763,430 users, baseline (non-private) training achieved an accuracyof 17.5% in 4120 rounds of training, where the data from 100 randomusers were used on each round. An example model according to exampleaspects of the present disclosure achieved the same level of accuracywith (4.6,10⁻⁹)-differential privacy in 4980 rounds, processing onaverage 5000 users per round, maintaining the same level of accuracy atan increased computational cost of roughly sixty times. In someimplementations, the computational cost may be mitigated by training ona public dataset rather than starting from a random initialization. Forexample, running the same computation on a larger dataset with 10⁸ userswould improve the privacy guarantee to (1.2,10⁻⁹). For example, privacycan be guaranteed and utility maintained despite the complex internalstructure of the model—with per-word embeddings as well as dense statetransitions—by using the example algorithms of the present disclosure.Further, the metrics and qualitative behavior (with respect to headwords) of the noised model according to example aspects of the presentdisclosure did not differ significantly from the non-private model.Moreover, in some implementations, parameters can be tuned for trainingcomplex models with differential privacy guarantees.

3. Example Systems

FIG. 1 depicts an example system 100 for training one or more machinelearning models 106 using respective training data 108 stored locally ona plurality of client computing devices 102 (i.e., a local dataset). Insome implementations, system 100 can include one or more servercomputing devices 104. The one or more server computing device(s) 104can be configured to access machine-learned model 106, and to providemodel 106 to a plurality of client computing devices 102. Model 106 canbe, for instance, a linear regression model, logistic regression model,a support vector machine model, a neural network (e.g. convolutionalneural network, recurrent neural network, etc.), or other suitablemodel. In some implementations, the one or more server computingdevice(s) 104 can be configured to communicate with client computingdevices 102 over one or more networks.

Client computing devices 102 can each be configured to determine one ormore local updates associated with model 106 based at least in part ontraining data 108. For instance, training data 108 can be data that isrespectively stored locally on the client devices 102. The training data108 can include audio files, image files, video files, a typing history,location history, and/or various other suitable data. In someimplementations, the training data 108 can be any data derived through auser interaction with a client computing device 102.

Further to the descriptions above, a user may be provided with controlsallowing the user to make an election as to both if and when systems,programs or features described herein may enable collection, storage,and/or use of user information (e.g., training data 108), and if theuser is sent content or communications from a server. In addition,certain data may be treated in one or more ways before it is stored orused, so that personally identifiable information is removed. Forexample, a user's identity may be treated so that no personallyidentifiable information can be determined for the user, or a user'sgeographic location may be generalized where location information isobtained (such as to a city, ZIP code, or state level), so that aparticular location of a user cannot be determined. Thus, the user mayhave control over what information is collected about the user, how thatinformation is used, and what information is provided to the user.

Although training data 108 is illustrated in FIG. 1 as a singledatabase, the training data 108 consists of data that is respectivelystored at each client computing device 102. Thus, in someimplementations, the training data 108 is highly unbalanced and notindependent and identically distributed.

Client computing devices 102 can be configured to provide the localupdates to the one or more server computing devices 104. As indicatedabove, training data 108 may be privacy sensitive. In this manner, thelocal updates can be performed and provided to server 104 withoutcompromising the privacy of training data 108. For instance, in someimplementations, training data 108 is not provided to the one or moreserver computing devices 104. Further, in some implementations, thelocal update does not include training data 108. In someimplementations, one or more of encryption techniques and/or othersecurity techniques can be added to the training process to assist inobscuring any inferable information. In some implementations, the localupdate can be clipped by the client computing device 102 before beingprovided to the one or more server computing devices 104, as disclosedherein.

As indicated above, the one or more server computing devices 104 canreceive each local update from client device 102, and can determinedifferentially private aggregate of the local updates. For example, insome implementations, a bounded-sensitivity data-weighted average of thelocal updates can be determined. Further, the one or more servercomputing devices 104 can determine an updated machine-learned modelbased at least in part on the differentially private aggregate of thelocal updates.

FIG. 2 depicts an example computing system 200 that can be used toimplement the methods and systems of the present disclosure. The system200 can be implemented using a client-server architecture that includesa server 210 (e.g., one or more server computing devices) thatcommunicates with one or more client devices 230 (e.g., client computingdevices) over a network 242. Thus, FIG. 2 provides an example system 200that can implement the scheme illustrated by system 100 of FIG. 1 .

The system 200 includes a server 210, such as a web server. The server210 can be implemented using any suitable computing device(s). Theserver 210 can have one or more processors 212 and one or more memorydevices 214. The server 210 can be implemented using one server deviceor a plurality of server devices. In implementations in which aplurality of devices are used, such plurality of devices can operateaccording to a parallel computing architecture, a sequential computingarchitecture, or a combination thereof.

The server 210 can also include a network interface used to communicatewith one or more client devices 230 over the network 242. The networkinterface can include any suitable components for interfacing with onemore networks, including for example, transmitters, receivers, ports,controllers, antennas, or other suitable components.

The one or more processors 212 can include any suitable processingdevice, such as a microprocessor, microcontroller, integrated circuit,logic device, or other suitable processing device. The one or morememory devices 214 can include one or more computer-readable media,including, but not limited to, non-transitory computer-readable media,RAM, ROM, hard drives, flash drives, or other memory devices. The one ormore memory devices 214 can store information accessible by the one ormore processors 212, including computer-readable instructions 216 thatcan be executed by the one or more processors 212.

The instructions 216 can be any set of instructions that when executedby the one or more processors 212, cause the one or more processors 212to perform operations. For example, the instructions 216 can be executedby the one or more processors 212 to implement a global updater 220. Theglobal updater 220 can be configured to receive one or more localupdates and to determine an updated machine-learned model based at leastin part on the local updates.

As shown in FIG. 2 , the one or more memory devices 214 can also storedata 218 that can be retrieved, manipulated, created, or stored by theone or more processors 212. The data 218 can include, for instance,local updates (and/or sums thereof), global parameters, and other data.For example, the sum of local updates for a particular round of trainingcan be stored temporarily until an updated machine-learned model isdetermined. The data 218 can be stored in one or more databases. The oneor more databases can be connected to the server 210 by a high bandwidthLAN or WAN, or can also be connected to server 210 through network 242.The one or more databases can be split up so that they are located inmultiple locales.

The server 210 can exchange data with one or more client devices 230over the network 242. Any number of client devices 230 can be connectedto the server 210 over the network 242. Each of the client devices 230can be any suitable type of computing device, such as a general purposecomputer, special purpose computer, laptop, desktop, mobile device,navigation system, smartphone, tablet, wearable computing device, gamingconsole, a display with one or more processors, or other suitablecomputing device.

Similar to the server 210, a client device 230 can include one or moreprocessor(s) 232 and a memory 234. The one or more processor(s) 232 caninclude, for example, one or more central processing units (CPUs),graphics processing units (GPUs) dedicated to efficiently renderingimages or performing other specialized calculations, and/or otherprocessing devices. The memory 234 can include one or morecomputer-readable media and can store information accessible by the oneor more processors 232, including instructions 236 that can be executedby the one or more processors 232 and data 238.

The instructions 236 can include instructions for implementing a localupdater configured to determine one or more local updates according toexample aspects of the present disclosure. For example, the localupdater can perform one or more training techniques such as, forexample, backwards propagation of errors, stochastic gradient descent,or other training technique to re-train or otherwise update the modelbased on the locally stored training data. The local updater can beconfigured to perform structured updates, sketched updates, or othertechniques. The local updater can be included in an application or canbe included in the operating system of the device 230.

The data 238 can include one or more training data examples to be usedin solving one or more optimization problems. The training data examplesof each client device 230 can be distributed unevenly among the clientdevices, such that no client device 230 includes a representative sampleof the overall distribution of the training data examples.

The data 238 can further include updated parameters to be communicatedto the server 210. For example, in some implementations, a client device230 can receive a machine-learned model (such as a set of globalparameters) from the server 210, train the machine-learned model basedat least in part on the local dataset to generate a locally-trainedmodel (such as updated local values for the global set of parameters forthe machine-learned model), determine a difference between themachine-learned model and the locally-trained model (such as adifference between the global parameters and the updated local values),and clip the difference to generate the local update. In someimplementations, the local update can be expressed in a vector, amatrix, or other suitable format.

The client device 230 of FIG. 2 can include various input/output devicesfor providing and receiving information from a user, such as a touchscreen, touch pad, data entry keys, speakers, and/or a microphonesuitable for voice recognition.

The client device 230 can also include a network interface used tocommunicate with one or more remote computing devices (e.g. server 210)over the network 242. The network interface can include any suitablecomponents for interfacing with one more networks, including forexample, transmitters, receivers, ports, controllers, antennas, or othersuitable components.

The network 242 can be any type of communications network, such as alocal area network (e.g. intranet), wide area network (e.g. Internet),cellular network, or some combination thereof. The network 242 can alsoinclude a direct connection between a client device 230 and the server210. In general, communication between the server 210 and a clientdevice 230 can be carried via network interface using any type of wiredand/or wireless connection, using a variety of communication protocols(e.g. TCP/IP, HTTP, SMTP, FTP), encodings or formats (e.g. HTML, XML),and/or protection schemes (e.g. VPN, secure HTTP, SSL).

4. Example Methods

FIG. 3 depicts a flow diagram of an example method (300) fordifferentially private machine learning according to example aspects ofthe present disclosure. Method (300) can be implemented by one or morecomputing devices, such as one or more of the computing devices depictedin FIGS. 1 and/or 2 . In addition, FIG. 3 depicts steps performed in aparticular order for purposes of illustration and discussion. Those ofordinary skill in the art, using the disclosures provided herein, willunderstand that the steps of any of the methods discussed herein can beadapted, rearranged, expanded, omitted, or modified in various wayswithout deviating from the scope of the present disclosure.

At (302), the method (300) can include selecting, by one or more servercomputing devices, a subset of client computing devices from a pool ofavailable client computing devices. For example, in someimplementations, the pool of available client computing devices caninclude a plurality of client computing devices that are powered on,plugged into a power source, and/or in an idle mode. In someimplementations, each client computing device can be independentlyselected from the pool based at least in part on a probability parameterq.

At (304), the method (300) can include providing, by the one or moreserver computing devices, the machine-learned model to the selectedclient computing devices, and at (306), the method (300) can includereceiving, by the selected client computing devices, the machine-learnedmodel. In some implementations, the machine-learned model can be, forexample, a global set of parameters.

At (308), the method (300) can include determining, by each selectedclient computing device, a local update based at least in part on alocal dataset stored locally on the selected client computing device.For example, in some implementations, each selected client computingdevice can train the machine-learned model based at least in part on thelocal dataset to determine a locally-trained model. For example, in someimplementations, the client computing device can train themachine-learned model via stochastic gradient descent. In someimplementations, the local update can be determined by each selectedclient computing device by first determining a difference between thelocally-trained model and the machine-and learned model. For example,the difference can be a difference between a set of global parametersand updated local values for the global set of parameters for themachine-learned model. In some implementations, the local update can bedetermined by clipping the difference between the locally-trained modeland the machine-learned model. For example, in some implementations, aselected client computing device can perform flat clipping or per-layerclipping to generate the local update.

At (310), the method (300) can include providing, by each selectedclient computing device, the local update to the one or more servercomputing devices, and at (312), the method (300) can include receiving,by the one or more server computing devices, the local updates. In someimplementations, the local updates can be, for example, expressed in oneor more matrices, vectors, or other suitable format.

At (314), the method (300) can include determining a differentiallyprivate aggregate of the local updates. For example, in someimplementations, the differentially private aggregate can be abounded-sensitivity data-weighted average of the local updates can bedetermined. In some implementations, the bounded-sensitivitydata-weighted average of the local updates can be determined based atleast in part on an expected weight parameter.

In some implementations, the one or more server computing devices candetermine the bounded-sensitivity data-weighted average of the localupdates by estimating the bounded-sensitivity data-weighted average byan unbiased estimator. For example, an unbiased estimator can use aweighted sum of the local updates divided by a selection probabilityparameter times a sum of all weights associated with the pool ofavailable client computing devices, as disclosed herein.

In some implementations, the one or more server computing devices candetermine the bounded-sensitivity data-weighted average of the localupdates by estimating the bounded-sensitivity data-weighted average by abiased estimator. For example, a biased estimator can use a weighted sumof the local updates divided by a maximum of: a selection probabilityparameter times a lower bound weight; or a sum of all weights associatedwith the selected client computing devices.

In some implementations, determining the bounded-sensitivitydata-weighted average of the local updates can include enforcing a boundon a computed average of the local updates. For example, the bound caninclude multiplying the computed average by a minimum of: one; or abound value divided by the computed average.

At (316), the method (300) can include determining an updatedmachine-learned model based at least in part on the bounded-sensitivitydata-weighted average of the local updates. For example, in someimplementations, the bounded-sensitivity data-weighted average of thelocal updates can be added to the machine-learned model to determine theupdated machine-learned model. In some implementations, a noisecomponent can be added to the bounded-sensitivity data-weighted averageof the local updates to determine the updated model. In someimplementations, the noise component can be a Gaussian noise componentscaled to the sensitivity of the weighted average.

At (318), the method (300) can include providing, by the one or moreserver computing devices, the updated machine-learned model to one ormore client computing devices, and at (320), the method (300) caninclude receiving, by the one or more client computing devices, theupdated machine-learned model. For example, the updated machine-learnedmodel can be a global model provided to the pool of available clientcomputing devices.

Any number of iterations of local and global updates can be performed.That is, method (300) can be performed iteratively to update themachine-learned model based on locally stored training data over time.

FIG. 4 depicts a flow diagram of an example method (400) fordifferentially private machine learning according to example aspects ofthe present disclosure. Method (400) can be implemented by one or moreserver computing devices, such as one or more server computing devicesdepicted in FIGS. 1 and/or 2 . In addition, FIG. 4 depicts stepsperformed in a particular order for purposes of illustration anddiscussion. Those of ordinary skill in the art, using the disclosuresprovided herein, will understand that the steps of any of the methodsdiscussed herein can be adapted, rearranged, expanded, omitted, ormodified in various ways without deviating from the scope of the presentdisclosure. The one or more server computing devices can include one ormore processors and one or more non-transitory computer readable media.

At (402), the method (400) can include selecting, by the one or moreserver computing devices, a subset of client computing devices from apool of available client computing devices. For example, in someimplementations, the pool of available client computing devices caninclude a plurality of client computing devices that are powered on,plugged into a power source, and/or in an idle mode. In someimplementations, each client computing device can be independentlyselected from the pool based at least in part on a probability parameterq.

At (404), the method (400) can include providing, by the one or moreserver computing devices, the machine-learned model to the selectedclient computing devices. For example, the one or more server computingdevices can communicate the machine-learned model to the selected clientcomputing devices via a network.

At (406) the method (400) can include receiving, from each selectedclient computing device, a local update for the machine-learned model.In some implementations, each local update can be determined based atleast in part on a local dataset stored locally on the selected clientcomputing device. For example, in some implementations, each selectedclient computing device can train the machine-learned model baseless inpart on the local dataset to determine a locally-trained model. In someimplementations, the local updates can be clipped, as described herein,prior to being received by the one or more server computing devices.

At (408), the method (400) can include determining a bounded-sensitivitydata-weighted average of the local updates. In some implementations, thebounded-sensitivity data-weighted average of the local updates can bedetermined based at least in part on an expected weight parameter.

In some implementations, the one or more server computing devices candetermine the bounded-sensitivity data-weighted average of the localupdates by estimating the bounded-sensitivity data-weighted average byan unbiased estimator. For example, an unbiased estimator can use aweighted sum of the local updates divided by a selection probabilityparameter times a sum of all weights associated with the pool ofavailable client computing devices, as disclosed herein.

In some implementations, the one or more server computing devices candetermine the bounded-sensitivity data-weighted average of the localupdates by estimating the bounded-sensitivity data-weighted average by abiased estimator. For example, a biased estimator can use a weighted sumof the local updates divided by a maximum of: a selection probabilityparameter times a lower bound weight; or a sum of all weights associatedwith the selected client computing devices.

In some implementations, determining the bounded-sensitivitydata-weighted average of the local updates can include enforcing a boundon a computed average of the local updates. For example, the bound caninclude multiplying the computed average by a minimum of: one; or abound value divided by the computed average.

At (410), the method (400) can include adding a noise component to thebounded-sensitivity data-weighted average of the local updates. Forexample, in some implementations, the noise component can be a Gaussiannoise component scaled to the sensitivity of the weighted average.

At (412), the method (400) can include determining an updatedmachine-learned model based at least in part on the bounded-sensitivitydata-weighted average of the local updates. For example, in someimplementations, the bounded-sensitivity data-weighted average of thelocal updates can be added to the machine-learned model to determine theupdated machine-learned model. In some implementations, the updatedmachine-learned model can be the bounded-sensitivity data-weightedaverage of the local updates plus the noise component, plus themachine-learned model.

At (414), the method (400) can include determining a privacy guaranteeparameter based at least in part on the bounded-sensitivitydata-weighted average of the local updates. In some implementations theprivacy guarantee parameter can be used to evaluate the differentialprivacy of the updated machine-learned model. In some implementations,the privacy guarantee parameter can be provided with the updatedmachine-learned model to users of the machine-learned model.

Any number of iterations of updates can be performed. That is, method(400) can be performed iteratively to update the machine-learned modelbased on locally stored training data over time.

FIG. 5 depicts a flow diagram of an example method (500) for determininga local update according to example aspects of the present disclosure.Method (500) can be implemented by one or more client computing devices,such as one or more client computing devices depicted in FIGS. 1 and/or2 . In addition, FIG. 5 depicts steps performed in a particular orderfor purposes of illustration and discussion. Those of ordinary skill inthe art, using the disclosures provided herein, will understand that thesteps of any of the methods discussed herein can be adapted, rearranged,expanded, omitted, or modified in various ways without deviating fromthe scope of the present disclosure. The one or more client computingdevices can include one or more processors and one or morenon-transitory computer readable media.

At (502), the method (500) can include receiving, by a selected clientcomputing devices, the machine-learned model from one or more servercomputing devices. In some implementations, the machine-learned modelcan be, for example, a global set of parameters.

At (504), the method (500) can include training a machine-learned modelby the client computing devices based at least in part on a localdataset to generate a locally-trained model. For example, in someimplementations, the client computing device can train themachine-learned model via stochastic gradient descent.

At (506), the method (500) can include determining a difference betweenthe locally-trained model and the machine-learned model. For example, insome implementations, the difference between the locally-trained modeland the machine-learned model can be determined by determining adifference between the global set of parameters for the machine-learnedmodel provided by the one or more server computing devices and theupdated local values for the global set of parameters determined bytraining the machine-learned model with the local dataset.

At (508), the method (500) can include clipping the difference togenerate a local update. For example, the influence of any one clientcomputing device on an updated machine-learned model parameter can belimited by clipping the difference to have a bounded L₂ norm. In someimplementations, clipping can include performing flat clipping orper-layer clipping, as disclosed herein.

At (510), the method (500) can include providing, by the clientcomputing device, the local update to the one or more server computingdevices. For example, the client computing device can communicate thelocal update to one or more server computing devices via a network.

Additional Disclosure

The technology discussed herein makes reference to servers, databases,software applications, and other computer-based systems, as well asactions taken and information sent to and from such systems. Theinherent flexibility of computer-based systems allows for a greatvariety of possible configurations, combinations, and divisions of tasksand functionality between and among components. For instance, processesdiscussed herein can be implemented using a single device or componentor multiple devices or components working in combination. Databases andapplications can be implemented on a single system or distributed acrossmultiple systems. Distributed components can operate sequentially or inparallel.

While the present subject matter has been described in detail withrespect to various specific example embodiments thereof, each example isprovided by way of explanation, not limitation of the disclosure. Thoseskilled in the art, upon attaining an understanding of the foregoing,can readily produce alterations to, variations of, and equivalents tosuch embodiments. Accordingly, the subject disclosure does not precludeinclusion of such modifications, variations and/or additions to thepresent subject matter as would be readily apparent to one of ordinaryskill in the art. For instance, features illustrated or described aspart of one embodiment can be used with another embodiment to yield astill further embodiment. Thus, it is intended that the presentdisclosure cover such alterations, variations, and equivalents.

1-20. (canceled)
 21. A computing system, comprising: one or moreprocessors; and one or more non-transitory computer-readable media thatcollectively store instructions that are executable by the one or moreprocessors to cause the computing system to perform operations, theoperations comprising: receiving, from one or more client computingdevices from a pool of available client computing devices, a localupdate for a machine-learned model; determining a differentially privateaggregate of the local updates, wherein the differentially privateaggregate satisfies a differential privacy metric such that asensitivity of the aggregate to data from any one client is bounded;determining an updated machine-learned model based at least in part onthe differentially private aggregate of the local updates; andtransmitting, through a network interface, one or more model parametersof the updated machine-learned model for delivery to one or more of theavailable client computing devices, wherein a sensitivity of thetransmitted one or more model parameters to the data from any one clientis bounded.
 22. The computing system of claim 21, wherein thedifferentially private aggregate comprises a noise component.
 23. Thecomputing system of claim 22, wherein the noise component is independentand identically distributed.
 24. The computing system of claim 22,wherein the noise component is determined based at least in part on atotal privacy cost over a plurality of update steps.
 25. The computingsystem of claim 24, wherein a respective step of the plurality of updatesteps comprises selecting the one or more client computing devices fromthe pool of available client computing devices.
 26. The computing systemof claim 21, wherein the operations comprise: receiving, from at leastone client device, an indication of an election to participate in thepool of available client computing devices; and adding the at least oneclient device to the pool of available client devices.
 27. The computingsystem of claim 21, wherein the operations comprise: receiving, from atleast one client device, an indication of an election not to participatein the pool of available client computing devices; and removing the atleast one client device from the pool of available client devices. 28.One or more non-transitory computer-readable media that collectivelystore instructions that are executable by one or more processors tocause a computing system to perform operations, the operationscomprising: receiving, from one or more client computing devices from apool of available client computing devices, a local update for amachine-learned model; determining a differentially private aggregate ofthe local updates, wherein the differentially private aggregatesatisfies a differential privacy metric such that a sensitivity of theaggregate to data from any one client is bounded; determining an updatedmachine-learned model based at least in part on the differentiallyprivate aggregate of the local updates; and transmitting, through anetwork interface, one or more model parameters of the updatedmachine-learned model for delivery to one or more of the availableclient computing devices, wherein a sensitivity of the transmitted oneor more model parameters to the data from any one client is bounded. 29.The one or more non-transitory computer-readable media of claim 28,wherein the differentially private aggregate comprises a noisecomponent.
 30. The one or more non-transitory computer-readable media ofclaim 29, wherein the noise component is independent and identicallydistributed.
 31. The one or more non-transitory computer-readable mediaof claim 29, wherein the noise component is determined based at least inpart on a total privacy cost over a plurality of update steps.
 32. Theone or more non-transitory computer-readable media of claim 31, whereina respective step of the plurality of update steps comprises selectingthe one or more client computing devices from the pool of availableclient computing devices.
 33. The one or more non-transitorycomputer-readable media of claim 28, wherein the operations comprise:receiving, from at least one client device, an indication of an electionto participate in the pool of available client computing devices; andadding the at least one client device to the pool of available clientdevices.
 34. The one or more non-transitory computer-readable media ofclaim 28, wherein the operations comprise: receiving, from at least oneclient device, an indication of an election not to participate in thepool of available client computing devices; and removing the at leastone client device from the pool of available client devices.
 35. Amethod comprising: receiving, by a computing system comprising one ormore processors, from one or more client computing devices from a poolof available client computing devices, a local update for amachine-learned model; determining, by the computing system, adifferentially private aggregate of the local updates, wherein thedifferentially private aggregate satisfies a differential privacy metricsuch that a sensitivity of the aggregate to data from any one client isbounded; determining, by the computing system, an updatedmachine-learned model based at least in part on the differentiallyprivate aggregate of the local updates; and transmitting, by thecomputing system and through a network interface, one or more modelparameters of the updated machine-learned model for delivery to one ormore of the available client computing devices, wherein a sensitivity ofthe transmitted one or more model parameters to the data from any oneclient is bounded.
 36. The method of claim 35, wherein thedifferentially private aggregate comprises a noise component.
 37. Themethod of claim 36, wherein the noise component is independent andidentically distributed.
 38. The method of claim 36, wherein the noisecomponent is determined based at least in part on a total privacy costover a plurality of update steps.
 39. The method of claim 35,comprising: receiving, by the computing system and from at least oneclient device, an indication of an election to participate in the poolof available client computing devices; and adding, by the computingsystem, the at least one client device to the pool of available clientdevices.
 40. The method of claim 35, comprising: receiving, by thecomputing system and from at least one client device, an indication ofan election not to participate in the pool of available client computingdevices; and removing, by the computing system, the at least one clientdevice from the pool of available client devices.